package personal.zq.practice.common.constants;

public class UserAuditConstants {
    public static enum UserAudit {
        INIT("init", "新增待审核"), PASS("pass", "新增审核通过"), REJECT("reject", "新增审核不通过"), DELETE_INIT("delete_init", "删除待审核"), DELETE_PASS("delete_pass",
                "删除审核通过"), DELETE_REJECT("delete_reject", "删除审核不通过");
        private String value;
        private String desc;

        UserAudit(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static boolean isEnum(String value) {
            return get(value) != null;
        }

        public static UserAudit get(String value) {
            for (UserAudit audit : UserAudit.values()) {
                if (audit.value.equalsIgnoreCase(value)) {
                    return audit;
                }
            }
            return null;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }
}